package com.demo.widget.meis;

import com.demo.widget.BaseAbility;
import com.demo.widget.ResourceTable;
import com.meis.widget.rose.RoseGiftSurfaceView;
import ohos.aafwk.content.Intent;

/**
 * Created by wenshi on 2018/6/26.
 * Description
 */
public class MeiRoseAbility extends BaseAbility {
    private RoseGiftSurfaceView mRoseGiftSurfaceView;

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(ResourceTable.Layout_mei_rose_ability);
        mRoseGiftSurfaceView = (RoseGiftSurfaceView) findComponentById(ResourceTable.Id_rose);
    }

    @Override
    protected void onBackPressed() {
        super.onBackPressed();
        mRoseGiftSurfaceView.stopAnimation();
    }

    @Override
    protected void onStop() {
        super.onStop();
        mRoseGiftSurfaceView.stopAnimation();
    }

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        mRoseGiftSurfaceView.startAnimation();
    }
}
